package com.yn.xr.news.mode;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @description: 实体类-- 新闻记录表
 * @fileName:NewsComment.java
 * @createTime:2015年4月27日 下午5:20:24
 * @author:yangjiao
 * @version 1.0.0
 */
@Entity
@Table(name = "t_news_info", catalog = "xrnetwork")
public class NewsInfo implements Serializable {
	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = -7903420871457544224L;
	// Fields
	// 站内新闻唯一标识
	private Integer newsId;
	// 新闻标题
	private String title;
	// 新闻内容
	private String content;
	// 新闻添加时间
	private Date createTime;
	// 新闻类型（1:官方公告 2：理财课堂 3：头条新闻）
	private Short type;
	// 关键词
	private String keyWords;
	// 描述
	private String description;
	// 概述
	private String summary;
	// 点赞数
	private Integer praise;
	// 图片名称
	private String picFileName;
	// 浏览次数
	private Integer browseNumber;
	// 是否允许被评论 1 允许评论 0 不允许评论
	private Short canDiscuss;
	// 评论是否被清理
	private Short discussCle;
	// 是否推荐
	private Short recommend; // 1:'是',0:'否'
	// 推荐时间
	private Date recommendTime;
	// 查询的开始时间
	private Date lowTime;
	// 查询的结束时间
	private Date topTime;
	// 平台ID
	private Integer platformId;
	// 是否发布
	private Short status;
	// 修改时间
	private Date updateTime;
	// 发布时间
	private Date publishTime;
	// 新闻标志（1：上一篇 2：下一篇）
	private Integer infoMark;

	private String[] platformIdList;
	// 平台名称
	private String plateformName;

	
	
	private Integer createUserId; //消息录入人

	private String sponsor;//发起单位、个人
	
	private Date startTime;//招募起始时间
	
	private Date endTime;//招募结束时间
	
	
	/** default constructor */
	public NewsInfo() {
	}

	public NewsInfo(Short type, Short status, Integer platformId) {
		super();
		this.type = type;
		this.status = status;
		this.platformId = platformId;
	}

	public NewsInfo(Integer newsId, String title, String content,
			Date createTime, Short type, String keyWords, String description,
			String summary, Integer praise, String picFileName,
			Integer browseNumber, Short canDiscuss, Short discussCle,
			Short recommend, Date lowTime, Date topTime, Integer platformId,
			Short status,Integer createUserId , String sponsor ,Date startTime,Date endTime ) {
		super();
		this.newsId = newsId;
		this.title = title;
		this.content = content;
		this.createTime = createTime;
		this.type = type;
		this.keyWords = keyWords;
		this.description = description;
		this.summary = summary;
		this.praise = praise;
		this.picFileName = picFileName;
		this.browseNumber = browseNumber;
		this.canDiscuss = canDiscuss;
		this.discussCle = discussCle;
		this.recommend = recommend;
		this.lowTime = lowTime;
		this.topTime = topTime;
		this.platformId = platformId;
		this.status = status;
		this.createUserId = createUserId;
		this.sponsor = sponsor;
		this.startTime = startTime;
		this.endTime = endTime;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "newsId", unique = true, nullable = false)
	public Integer getNewsId() {
		return newsId;
	}

	public void setNewsId(Integer newsId) {
		this.newsId = newsId;
	}
	@Column(name = "title")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	@Column(name = "content")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	@Column(name = "createTime")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(name = "type")
	public Short getType() {
		return type;
	}

	public void setType(Short type) {
		this.type = type;
	}
	@Column(name = "keyWords")
	public String getKeyWords() {
		return keyWords;
	}

	public void setKeyWords(String keyWords) {
		this.keyWords = keyWords;
	}
	@Column(name = "description")
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	@Column(name = "summary")
	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}
	@Column(name = "praise")
	public Integer getPraise() {
		return praise;
	}

	public void setPraise(Integer praise) {
		this.praise = praise;
	}
	@Column(name = "picFileName")
	public String getPicFileName() {
		return picFileName;
	}

	public void setPicFileName(String picFileName) {
		this.picFileName = picFileName;
	}
	@Column(name = "browseNumber")
	public Integer getBrowseNumber() {
		return browseNumber;
	}

	public void setBrowseNumber(Integer browseNumber) {
		this.browseNumber = browseNumber;
	}
	@Column(name = "canDiscuss")
	public Short getCanDiscuss() {
		return canDiscuss;
	}

	public void setCanDiscuss(Short canDiscuss) {
		this.canDiscuss = canDiscuss;
	}
	@Column(name = "discussCle")
	public Short getDiscussCle() {
		return discussCle;
	}

	public void setDiscussCle(Short discussCle) {
		this.discussCle = discussCle;
	}
	@Column(name = "recommend")
	public Short getRecommend() {
		return recommend;
	}

	public void setRecommend(Short recommend) {
		this.recommend = recommend;
	}
	
	@Column(name = "platformId")
	public Integer getPlatformId() {
		return platformId;
	}

	public void setPlatformId(Integer platformId) {
		this.platformId = platformId;
	}
	@Column(name = "status")
	public Short getStatus() {
		return status;
	}

	public void setStatus(Short status) {
		this.status = status;
	}
	@Column(name = "updateTime")
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	@Column(name = "publishTime")
	public Date getPublishTime() {
		return publishTime;
	}

	public void setPublishTime(Date publishTime) {
		this.publishTime = publishTime;
	}
	@Column(name = "recommendTime")
	public Date getRecommendTime() {
		return recommendTime;
	}

	public void setRecommendTime(Date recommendTime) {
		this.recommendTime = recommendTime;
	}
	@Column(name = "createUserId")
	public Integer getCreateUserId() {
		return createUserId;
	}

	public void setCreateUserId(Integer createUserId) {
		this.createUserId = createUserId;
	}
	@Column(name = "sponsor")
	public String getSponsor() {
		return sponsor;
	}

	public void setSponsor(String sponsor) {
		this.sponsor = sponsor;
	}
	@Column(name = "startTime")
	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	@Column(name = "endTime")
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	
	
	@Transient
	public Integer getInfoMark() {
		return infoMark;
	}

	public void setInfoMark(Integer infoMark) {
		this.infoMark = infoMark;
	}
	@Transient
	public String[] getPlatformIdList() {
		return platformIdList;
	}

	public void setPlatformIdList(String[] platformIdList) {
		this.platformIdList = platformIdList;
	}
	@Transient
	public String getPlateformName() {
		return plateformName;
	}

	public void setPlateformName(String plateformName) {
		this.plateformName = plateformName;
	}
	@Transient
	public Date getLowTime() {
		return lowTime;
	}

	public void setLowTime(Date lowTime) {
		this.lowTime = lowTime;
	}
	@Transient
	public Date getTopTime() {
		return topTime;
	}

	public void setTopTime(Date topTime) {
		this.topTime = topTime;
	}
}
